Use two numbers from a list to do simple calculations in Python